package com.wn.sms.controller;

import com.wn.common.result.Result;
import com.wn.sms.service.ISmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yellow Docter
 * @date 2024-09-04
 * @desc 蜗牛创想：www.woniuxy.com
 * 
 */
@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    private ISmsService iSmsService;

    @GetMapping("/{phone}")
    public Result getCode(@PathVariable("phone")String phone){
        String code  = iSmsService.getCode(phone);
        return Result.fail("获取验证码",code);
    }

}
